#include <iostream>
using namespace std;
#include "bstree.hpp"
#include <vector>
using namespace zq;

int main() {
  BSTree<int> tree;
  vector<int> arr = {5, 3, 4, 1, 7, 8, 2, 6, 0, 9};
  // 把他们插入到二叉树中
  for (auto e : arr) {
    tree.insert(e);
  }

  tree.InOrder();

  tree.erase(3);
  tree.erase(5);
  tree.erase(7);
  tree.erase(4);
  tree.erase(1);
  tree.erase(8);
  tree.erase(2);
  tree.erase(6);
  tree.erase(0);
  tree.erase(9);



  tree.InOrder();
  return 0;
}
